package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/*
    点赞
 */
@Getter
@Setter
@ToString
public class StrategyLike extends BaseDomain {
    public static final int STATE_READ = 0; // 已读
    public static final int STATE_UNREAD= 1; // 未读
    // 点赞的攻略
    private Strategy strategy;
    //点赞的人
    private User user;
    //评论的人
    private User author;
    // 点赞的评论
    private StrategyComment comment;
    // 点赞的时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date likeTime;
    // 点赞评论和点赞攻略的状态->默认未读状态
    private Integer state=STATE_UNREAD;

}